﻿<%@ Page Title="Publication" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Publication.aspx.cs" Inherits="PublSystem.Publication" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<asp:Repeater ID="publ" runat="server">
    <ItemTemplate>
            <h3><b><asp:Label ID="txtTitle" runat="server" Text='<%# Eval("title") %>' /></b></h3> 
            Link: <asp:Label ID="txtLink" runat="server" Text='<%# "<a href=\"" + (Eval("link").ToString() == "Publication?id=" ? "Publication?id="+ Eval("publicationId") : Eval("link")) + "\">" + (Eval("link").ToString() == "Publication?id=" ? "Publication?id="+ Eval("publicationId") : Eval("link")) + "</a>" %>' /><br/>
            Published: <asp:Label ID="txtPublished" runat="server" Text='<%# String.Format("{0:d}", Eval("published")) %>' /><br/>
            <p>Updated: <asp:Label ID="txtUpdated" runat="server" Text='<%# String.Format("{0:d}", Eval("updated")) %>' /></p>
            <p><asp:Label ID="Label1" class="btn btn-default" runat="server" Text='<%# "<a href=\"Delete?article=" + Eval("publicationId") + "\">Delete</a>" %>' /> <asp:Label ID="EditLbl" class="btn btn-default" runat="server" Text='<%# "<a href=\"Edit?id=" + Eval("publicationId") + "\">Edit</a>" %>' /></p>
            <p><asp:Label ID="txtSummary" runat="server" Text='<%# Eval("summary") %>' /></p>                        
    </ItemTemplate>
</asp:Repeater>
    <p>Author:</p>
    <asp:Repeater ID="Authors" runat="server">
   <ItemTemplate>
            <asp:Label ID="txtAuthor" runat="server" Text='<%# Eval("name") %>' />                   
    </ItemTemplate>
</asp:Repeater><p></p
    <p>Keywords:</p>
 <asp:Repeater ID="Keywords" runat="server">
   <ItemTemplate>
            <asp:Label ID="txtKeyword" runat="server" Text='<%# "<a href=\"Keyword?q="+Eval("keyword")+"\">" + Eval("keyword") + "</a> " %>' />                   
    </ItemTemplate>
</asp:Repeater>
</asp:Content>
